package com.nov.multidatasource.service.impl;

import com.nov.multidatasource.dao.primary.UserMapper;
import com.nov.multidatasource.entity.primary.User;
import com.nov.multidatasource.service.UserService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class UserServiceImpl implements UserService {

  @Resource
  private UserMapper userMapper;

  @Override
  public void save() throws Exception {
    try {
      User user = new User();
      user.setName("zs");
      userMapper.insert(user);
    } catch (Exception e) {
      throw new Exception(e);
    }

  }
}
